home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / misc / apalike.doc < prev    next >
Text File  |  1992-03-09  |  2KB  |  61 lines

  1. % apalike.sty style, used in conjunction with apalike.bst,
  2. % will produce an apa-like bibliography style:
  3. %
  4. % 1) Bibliography entries formatted alphabetically, last name
  5. %    first, each entry having a hanging indentation and no label.
  6. % 2) References in the following formats:
  7. %        (Author, 1986)
  8. %        (Author and Author, 1986)
  9. %        (Author et al., 1986).
  10. % 3) Multiple references in the form (Author1, 1986; Author2, 1987)
  11. %
  12. % To be used as an optional argument to the \documentstyle command; for example
  13. %    \documentstyle[11pt,apalike]{book}
  14. %
  15. % 16-Sep-86, original version by Susan King and Oren Patashnik.
  16. % 13-Oct-87 changes:
  17. %    Fixed bug in last line by adding the {} that disappeard when
  18. %        the \hbox{} was removed from the pre-APALIKE definition;
  19. %    added club and widow penalties;
  20. %    patched the \newblock LaTeX bug from `-.07em' to simply `.07em';
  21. %    and made this work for document styles that don't define `chapter'.
  22. %
  23. %
  24. % Use parens instead of brackets for \cite, and no label in the bibliography
  25. %
  26. \def\@cite#1#2{(#1\if@tempswa , #2\fi)}
  27. \def\@biblabel#1{}
  28.  
  29. % Set length of hanging indentation for bibliography entries
  30. %
  31. \newlength{\bibhang}
  32. \setlength{\bibhang}{2em}
  33.  
  34. % \thebibliography environment depends on whether or not `chapter's can exist
  35. %
  36. \@ifundefined{chapter}{\def\thebibliography#1{\section*{References\@mkboth
  37.   {REFERENCES}{REFERENCES}}\list
  38.   {\relax}{\setlength{\labelsep}{0em}
  39.     \setlength{\itemindent}{-\bibhang}
  40.     \setlength{\leftmargin}{\bibhang}}
  41.     \def\newblock{\hskip .11em plus .33em minus .07em}
  42.     \sloppy\clubpenalty4000\widowpenalty4000
  43.     \sfcode`\.=1000\relax}}%
  44. {\def\thebibliography#1{\chapter*{Bibliography\@mkboth
  45.   {BIBLIOGRAPHY}{BIBLIOGRAPHY}}\list
  46.   {\relax}{\setlength{\labelsep}{0em}
  47.     \setlength{\itemindent}{-\bibhang}
  48.     \setlength{\leftmargin}{\bibhang}}
  49.     \def\newblock{\hskip .11em plus .33em minus .07em}
  50.     \sloppy\clubpenalty4000\widowpenalty4000
  51.     \sfcode`\.=1000\relax}}
  52.  
  53. % `; ' goes between cites, and there's no \hbox around individual cites
  54. %
  55. \def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
  56.   \def\@citea{}\@cite{\@for\@citeb:=#2\do
  57.     {\@citea\def\@citea{; }\@ifundefined
  58.        {b@\@citeb}{{\bf ?}\@warning
  59.        {Citation `\@citeb' on page \thepage \space undefined}}%
  60. {\csname b@\@citeb\endcsname}}}{#1}}
  61.